<!doctype html>
<html lang="en">

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- IE11 compatibility -->
  <script src="/node_modules/promise-polyfill/dist/polyfill.min.js"></script>

  <script src="../dist/sweetalert2.js"></script>
  <link rel="stylesheet" href="../dist/sweetalert2.css">
</head>

<body>
  <script>
    Swal.fire({
      title: 'Test modal with input',
      html: 'custom <strong>content</strong>',
      input: 'text',
      icon: 'success',
      showCloseButton: true,
      showCancelButton: true,
      preConfirm: function (value) {
        if (!value) {
          Swal.showValidationMessage('Should not be empty!')
        }
      },
      onOpen: function (modal) {
        console.log(modal)
      }
    }).then(function (result) {
      console.log(result)
    })
  </script>
</body>

</html>